package io.gitee.luoyuan800.tool.llm.bean.completion;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.gitee.luoyuan800.tool.llm.bean.Message;
import lombok.Data;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
@JsonIgnoreProperties(ignoreUnknown = true)
public class DeltaChatCompletion extends ChatCompletion<DeltaChatCompletion.DeltaChoice> {

    @Data
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class DeltaChoice extends Choice {
        private Message delta;
        private Integer flag;

        @Override
        public Message getMessage() {
            return delta;
        }
    }
}
